package com.training.java.core.tdd;

import org.junit.Test;

import junit.framework.TestCase;

public class CalculatorTest {

	@Test
	public void adding3And6ShouldGive9() {
		Calculator calc = new Calculator();
		int sum = (int) calc.add(3, 6);
		TestCase.assertEquals(9, sum);

	}

	@Test
	public void adding9And5ShouldGive14() {
		Calculator calc = new Calculator();
		int sum = (int) calc.add(9, 5);
		TestCase.assertEquals(14, sum);
	}

	@Test
	public void testAddDecimals() {
		Calculator calc = new Calculator();
		double sum = calc.add(5.2, 3.6);
		TestCase.assertEquals(8.8, sum);
	}

}
